package com.ybb.vue.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ybb.vue.entity.EpmResident;
import com.ybb.vue.entity.SysUser;
import com.ybb.vue.mapper.EpmResidentMapper;
import com.ybb.vue.mapper.SysUserMapper;
import com.ybb.vue.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ybb
 * @version 1.0
 * @Description TODO
 * @Date 2023/2/21 15:33
 */

@Service
public class IndexServiceImpl implements IndexService {
    @Autowired
    private EpmResidentMapper residentMapper;

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public Integer UserToals() {
        List<SysUser> userList = sysUserMapper.selectList(new QueryWrapper<>(null));
        return userList.size();
    }

    @Override
    public Integer ResidentToals() {
        List<EpmResident> residentList = residentMapper.selectList(new QueryWrapper<>(null));
        return residentList.size();
    }
}
